//
//  EditPasswordViewController.m
//  XingMei
//
//  Created by 钱金军 on 2019/3/21.
//  Copyright © 2019年 钱金军. All rights reserved.
//

#import "EditPasswordViewController.h"
#import "FilesHeader.h"

@interface EditPasswordViewController ()

@end

@implementation EditPasswordViewController
{
    UITextField *newPassword, *confirmPassword;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setNavBackgroundImageTitleText:@"修改密码"];
    [self setContentView];
}

- (void)setContentView{
    NSArray *imgArr = [NSArray arrayWithObjects:@"register_icon_2",@"register_icon_2", nil];
    NSArray *titleArr = [NSArray arrayWithObjects:@"新密码",@"确认密码", nil];
    
    for (int i = 0; i < imgArr.count; i++) {
        UIImageView *imgView = [[UIImageView alloc] initWithFrame:CGRectMake(50, Height_NavBar + 70 + i*35, 15, 15)];
        imgView.image = [UIImage imageNamed:imgArr[i]];
        [self.view addSubview:imgView];
        
        UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(imgView.right + 7, imgView.top, 70, 15)];
        label.text = titleArr[i];
        label.textColor = rgba(51, 51, 51, 1);
        label.textAlignment = NSTextAlignmentLeft;
        label.font = [UIFont fontWithName:ZhongDeng size:14];
        [self.view addSubview:label];
        
        UITextField *text = [[UITextField alloc] initWithFrame:CGRectMake(label.right + 10, label.top, KScreenWidth-label.right-70, label.frame.size.height)];
        text.layer.borderColor = [UIColor clearColor].CGColor;
        text.font = [UIFont fontWithName:ZhongDeng size:14];
        [self.view addSubview:text];
        
        UIView *line = [[UIView alloc] initWithFrame:CGRectMake(label.right, text.bottom + 10, KScreenWidth-label.right-50, 1)];
        line.backgroundColor = rgba(232, 232, 232, 1);
        [self.view addSubview:line];
        
        if (i == 0) {
            newPassword = text;
        }else if (i == 1){
            confirmPassword = text;
        }
        
        if (i == 1) {
            /** 确定 */
            UIButton *nextStepBtn = [[UIButton alloc] initWithFrame:CGRectMake(48, line.bottom + 40, KScreenWidth-96, 45)];
            [nextStepBtn setBackgroundImage:[UIImage imageNamed:@"register_img_10"] forState:UIControlStateNormal];
            [nextStepBtn setTitle:@"确定" forState:UIControlStateNormal];
            [nextStepBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
            nextStepBtn.layer.cornerRadius = 22;
            [self.view addSubview:nextStepBtn];
            [nextStepBtn addTarget:self action:@selector(determineTheChangeThePassword) forControlEvents:UIControlEventTouchUpInside];
        }
    }
}

#pragma mark 确定修改密码
- (void)determineTheChangeThePassword{
    
}






@end
